<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>文档</title>
	<script type="text/javascript" src="jquery.js"></script>
</head>
<body>
	1:元素定位
	<p id="111" style="height: 500px;">111111111111111111111111</p>
	<p id="222" style="height: 500px;">222222222222222222222222222222222222222222222222</p>
	<p id="333" style="height: 500px;">333333333333333333333</p>
		
		<script type="text/javascript">
		    //定位距离c	
			$("html,body").animate({scrollTop:$("#333").offset().top},1000);
		</script>
			
</body>
</html> 